package com.haoyu.microservicecloudconsumercategory80.service;

import com.haoyu.microservicecloudapi.entity.Category;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * @author: 蒿雨
 * @create: 2022-04-14 10:17
 * @description:
 */

@FeignClient(name = "microservicecloud-provider-category")
public interface CategoryFeginService {

    @RequestMapping("/category")
    List<Category> list();

    @RequestMapping("/{id}/category")
    Category get(@PathVariable(value = "id") Integer id);

    @RequestMapping("/category")
    boolean update(@RequestBody Category category);

    @RequestMapping("/category")
    boolean insert(@RequestBody Category category);

    @RequestMapping("/category")
    boolean delete(@PathVariable(value = "id") Integer id);

}
